package com.econ.powercloud.ems.domain;

import com.econ.powercloud.common.base.facade.util.JacksonUtil;
import com.econ.powercloud.ems.dal.entity.EmsDevice;
import com.econ.powercloud.ems.pojo.EmsDeviceVO;

import java.util.List;

/**
 * @author zjr
 * @create 2021/7/22 下午2:23
 * @description
 */
public class EmsDeviceDO {
    /**
     * 集合：实体类->VO类
     * @param emsDevices
     * @return
     */
    public static List<EmsDeviceVO> entityListToVOList(List<EmsDevice> emsDevices){
        List<EmsDeviceVO> emsDeviceVOS = JacksonUtil.convertToList(emsDevices, EmsDeviceVO.class);
        return emsDeviceVOS;
    }

    /**
     * 实体类->VO类
     */
    public static EmsDeviceVO entityToVO(EmsDevice emsDevice){
        return JacksonUtil.convertToObj(emsDevice,EmsDeviceVO.class);
    }
}
